<div class="panel panel-default panel-intro">
    <div class="panel-heading">
        {:build_heading(null, false)}
        <ul class="nav nav-tabs">
            {volist name="app_type" id="vo"}
            <li {if condition="$key eq 0"} class="active" {/if}><a href="#type_{$vo.id}" data-toggle="tab">{$vo.name}</a></li>
            {/volist}
        </ul>
    </div>
    <div class="panel-body">
        <div id="myTabContent" class="tab-content">
           {volist name="app_type" id="vo"}
            <div class="tab-pane fade {if condition="$key eq 0"} active in {/if}" id="type_{$vo.id}" data-id="{$vo.id}">
              <form id="type_{$vo.id}_form" class="form-horizontal" method="POST" action="">
                 <div class="bootstrap-table">
                    <div class="fixed-table-container" style="padding-bottom: 0px;">
                        <div class="fixed-table-body">
                            <table id="type_{$vo.id}_table" class="table table-striped table-bordered table-hover" width="100%">
                                <thead>
                                <tr>
                                    <th style="text-align: center; vertical-align: middle; ">
                                        <div class="th-inner ">类目</div>
                                    </th>
                                    <th style="text-align: center; vertical-align: middle; ">
                                        <div class="th-inner ">技术选型及工期</div>
                                    </th>
                                </tr>
                                <tr id="tech_type1">
                                    <th style="text-align: center; vertical-align: middle; ">
                                        <div class="th-inner ">后端技术</div>
                                    </th>
                                    <td>
                                        <div class="bootstrap-table">
                                            <div class="fixed-table-container" style="padding-bottom: 0px;">
                                                <div class="fixed-table-body">
                                                    <table  class="table table-striped table-bordered table-hover" width="100%">
                                                        <thead>
                                                        <tr>
                                                            <th style="text-align: center; vertical-align: middle; ">
                                                                <div class="th-inner ">功能名称</div>
                                                            </th>
                                                         
                                                            <th style="text-align: center; vertical-align: middle; ">
                                                                <div class="th-inner ">技术选型</div>
                                                            </th>
                                                        </tr>
                                                        {volist name="vo['gongnens']" id="gn"}
                                                          {php}
                                                            $list=db('bankuai_technology_select')->where(array('page_id'=>$page_id,'gid'=>$gn['id'],'type_id'=>$vo['id'],'tech_type'=>1))->find();
                                                            !empty($list)?$list['technology']=json_decode($list['technology'],true):'';
                                                            $data=db('gongnen')->where('id', $gn['gid'])->find();
														    $data_ch=db('gongnen_child')->where('id', $gn['child_id'])->find();
                                                          {/php}
                                                         <tr class="gongnen" data-id="{$list.id}">
                                                             <input type="hidden" name="id" value="{$list.id}">
                                                            <td style="text-align: center; vertical-align: middle;">
                                                                <input type="hidden" name="gid" value="{$gn.id}">
                                                                {$data.name}-{$data_ch.cname}
                                                            </td>
                                                         
                                                            <td style="text-align: center; vertical-align: middle;">

                                                                <div class="bootstrap-table">
                                                                    <div class="fixed-table-container" style="padding-bottom: 0px;">
                                                                        <div class="fixed-table-body">
                                                                            <table class="insert-tr table table-striped table-bordered table-hover onclick" width="100%">
                                                                                <thead>
                                                                                <tr>
                                                                                    <th style="text-align: center; vertical-align: middle; ">
                                                                                        <div class="th-inner ">应用语言</div>
                                                                                    </th>
                                                                                    <th style="text-align: center; vertical-align: middle; ">
                                                                                        <div class="th-inner ">工期（小时）</div>
                                                                                    </th>
                                                                                </tr>
                                                                              {notempty name="list['technology']"}
                                                                                {volist name="list['technology']" id="item"}
                                                                                <tr class="technology_language">
                                                                                    <td style="text-align: center; vertical-align: middle;">
                                                                                        <select class="form-control" name="tid" >
                                                                                            {volist name="technology_language1" id="th"}
                                                                                            <option value="{$th.id}" {if condition="$th['id'] eq $item[0]"}selected{/if}>{$th.name}</option>
                                                                                            {/volist}
                                                                                        </select>
                                                                                    </td>
                                                                                    <td class="copy" style="text-align: center; vertical-align: middle;">
                                                                                        <div class="col-xs-12 col-sm-8">
                                                                                            <input class="form-control" type="number" name="time" value="{$item[1]}">
                                                                                        </div>
                                                                                        <div class="col-xs-12 col-sm-3">
                                                                                            <a href="javascript:;" class="btn my-btn-add btn-success"><i class="fa fa-plus"></i></a>
                                                                                            <a href="javascript:;" class="btn my-btn-del btn-danger"><i class="fa fa-trash"></i></a>
                                                                                        </div>
                                                                                    </td>
                                                                                </tr>
                                                                                {/volist}
                                                                            {else /}
																				{php}
																				    $list=db('technology_select')->where(array('gid'=>$gn['child_id'],'type_id'=>$vo['id'],'tech_type'=>1))->find();
                                                                                    !empty($list)?$list['technology']=json_decode($list['technology'],true):'';
																				{/php}
																			 {notempty name="list['technology']"}	
                                                                               {volist name="list['technology']" id="item"}
                                                                                 <tr class="technology_language">
                                                                                    <td style="text-align: center; vertical-align: middle;">
                                                                                        <select class="form-control" name="tid" >
                                                                                            {volist name="technology_language1" id="th"}
                                                                                            <option value="{$th.id}" {if condition="$th['id'] eq $item[0]"}selected{/if}>{$th.name}</option>
                                                                                            {/volist}
                                                                                        </select>
                                                                                    </td>
                                                                                    <td class="copy" style="text-align: center; vertical-align: middle;">
                                                                                        <div class="col-xs-12 col-sm-8">
                                                                                            <input class="form-control" type="number" name="time" value="{$item[1]}">
                                                                                        </div>
                                                                                        <div class="col-xs-12 col-sm-3">
                                                                                            <a href="javascript:;" class="btn my-btn-add btn-success"><i class="fa fa-plus"></i></a>
                                                                                            <a href="javascript:;" class="btn my-btn-del btn-danger"><i class="fa fa-trash"></i></a>
                                                                                        </div>
                                                                                    </td>
                                                                                 </tr>
                                                                                {/volist}																		
																			 {else /}	
																			    <tr class="technology_language">
                                                                                             <td style="text-align: center; vertical-align: middle;">
                                                                                                <select class="form-control" name="tid" >
                                                                                                    <option value="0">请选择</option>
                                                                                                    {volist name="technology_language1" id="th"}
                                                                                                      <option value="{$th.id}">{$th.name}</option>
                                                                                                    {/volist}
                                                                                                </select>
                                                                                            </td>
                                                                                            <td class="copy" style="text-align: center; vertical-align: middle;">
                                                                                                <div class="col-xs-12 col-sm-8">
                                                                                                    <input class="form-control" type="number" name="time">
                                                                                                </div>
                                                                                                <div class="col-xs-12 col-sm-3">
                                                                                                    <a href="javascript:;" class="btn my-btn-add btn-success"><i class="fa fa-plus"></i></a>
                                                                                                    <a href="javascript:;" class="btn my-btn-del btn-danger"><i class="fa fa-trash"></i></a>
                                                                                                </div>
                                                                                            </td>
                                                                                         </tr>
																		     {/notempty}		
                                                                        {/notempty}
                                                                                </thead>
                                                                            </table>
                                                                        </div>
                                                                    </div>
                                                                </div>

                                                            </td>
                                                        </tr>
                                                        {/volist}
                                                        </thead>
                                                    </table>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                                <tr id="tech_type2">
                                    <th style="text-align: center; vertical-align: middle; ">
                                        <div class="th-inner ">页面制作技术</div>
                                    </th>
                                    <td>
                                        <div class="bootstrap-table">
                                            <div class="fixed-table-container" style="padding-bottom: 0px;">
                                                <div class="fixed-table-body">
                                                    <table  class="table table-striped table-bordered table-hover onclick" width="100%">
                                                        <thead class="select_box">
                                                        <tr>
                                                            <th style="text-align: center; vertical-align: middle; ">
                                                                <div class="th-inner ">终端版本</div>
                                                            </th>
                                                            <th style="text-align: center; vertical-align: middle; ">
                                                                <div class="th-inner ">功能类型</div>
                                                            </th>
                                                            <th style="text-align: center; vertical-align: middle; ">
                                                                <div class="th-inner ">技术选型</div>
                                                            </th>
                                                        </tr>

                                                  {notempty name="vo['list_2']"}
                                                      {volist name="vo['list_2']" id="item"}
                                                        {php}$item['technology']=json_decode($item['technology'],true);{/php}
                                                        <tr class="select_item" data-id="{$item['id']}">
                                                            <input type="hidden" name="id" value="{$item['id']}">
                                                            <td style="text-align: center; vertical-align: middle;">
                                                                <select class="form-control" name="gid">
                                                                    {volist name="app_version" id="version"}
                                                                     <option value="{$version['id']}" {if condition="(!empty($item)) AND $version['id'] eq $item['gid']"}selected{/if}>{$version.name}</option>
                                                                    {/volist}
                                                                </select>
                                                            </td>
                                                            <td style="text-align: center; vertical-align: middle;">
                                                                <select class="form-control" name="budget_id">
                                                                    {volist name="budget_manage2" id="bu"}
                                                                    <option value="{$bu.id}" {if condition="(!empty($item)) AND $bu['id'] eq $item['budget_id']"}selected{/if}>{$bu.name}</option>
                                                                    {/volist}
                                                                </select>
                                                            </td>
                                                            <td style="text-align: center; vertical-align: middle;">

                                                                <div class="bootstrap-table">
                                                                    <div class="fixed-table-container" style="padding-bottom: 0px;">
                                                                        <div class="fixed-table-body">
                                                                            <table class="insert-tr table table-striped table-bordered table-hover" width="100%">
                                                                                <thead>
                                                                                <tr>
                                                                                    <th style="text-align: center; vertical-align: middle; ">
                                                                                        <div class="th-inner ">应用语言</div>
                                                                                    </th>
                                                                                    <th style="text-align: center; vertical-align: middle; ">
                                                                                        <div class="th-inner ">工期（小时）</div>
                                                                                    </th>
                                                                                </tr>
                                                                              {notempty name="item['technology']"}
                                                                                {volist name="item['technology']" id="ch_item"}
                                                                                <tr class="technology_language">
                                                                                    <td style="text-align: center; vertical-align: middle;">
                                                                                        <select class="form-control" name="tid" >
                                                                                            {volist name="technology_language2" id="th"}
                                                                                            <option value="{$th.id}" {if condition="$th['id'] eq $ch_item[0]"}selected{/if}>{$th.name}</option>
                                                                                            {/volist}

                                                                                            <option value="0" {if condition="0 eq $ch_item[0]"}selected{/if}>仿制</option>
                                                                                        </select>
                                                                                    </td>
                                                                                    <td class="copy" style="text-align: center; vertical-align: middle;">
                                                                                        <div class="col-xs-12 col-sm-8">
                                                                                            <input class="form-control" type="number" name="time" value="{$ch_item[1]}">
                                                                                        </div>
                                                                                        <div class="col-xs-12 col-sm-3">
                                                                                            <a href="javascript:;" class="btn my-btn-add btn-success"><i class="fa fa-plus"></i></a>
                                                                                            <a href="javascript:;" class="btn my-btn-del btn-danger"><i class="fa fa-trash"></i></a>
                                                                                        </div>
                                                                                    </td>
                                                                                </tr>
                                                                                {/volist}
                                                                                {else /}
                                                                                <tr class="technology_language">
                                                                                    <td style="text-align: center; vertical-align: middle;">
                                                                                        <select class="form-control" name="tid" >
                                                                                            {volist name="technology_language2" id="th"}
                                                                                            <option value="{$th.id}">{$th.name}</option>
                                                                                            {/volist}
                                                                                        </select>
                                                                                    </td>
                                                                                    <td class="copy" style="text-align: center; vertical-align: middle;">
                                                                                        <div class="col-xs-12 col-sm-8">
                                                                                            <input class="form-control" type="number" name="time">
                                                                                        </div>
                                                                                        <div class="col-xs-12 col-sm-3">
                                                                                            <a href="javascript:;" class="btn my-btn-add btn-success"><i class="fa fa-plus"></i></a>
                                                                                            <a href="javascript:;" class="btn my-btn-del btn-danger"><i class="fa fa-trash"></i></a>
                                                                                        </div>
                                                                                    </td>
                                                                                </tr>
                                                                                    
                                                                                <tr class="technology_language">
                                                                                    <td style="text-align: center; vertical-align: middle;">
                                                                                        <select class="form-control" name="tid" >
                                                                                            <option value="0">仿制</option>
                                                                                        </select>
                                                                                    </td>
                                                                                    <td class="copy" style="text-align: center; vertical-align: middle;">
                                                                                        <div class="col-xs-12 col-sm-8">
                                                                                            <input class="form-control" type="number" name="time">
                                                                                        </div>
                                                                                        <div class="col-xs-12 col-sm-3">
                                                                                            <a href="javascript:;" class="btn my-btn-add btn-success"><i class="fa fa-plus"></i></a>
                                                                                            <a href="javascript:;" class="btn my-btn-del btn-danger"><i class="fa fa-trash"></i></a>
                                                                                        </div>
                                                                                    </td>
                                                                                </tr>
                                                                                {/notempty}

                                                                                </thead>
                                                                            </table>
                                                                        </div>
                                                                    </div>
                                                                </div>

                                                            </td>

                                                            <td class="copy" style="text-align: center; vertical-align: middle;">
                                                                <div class="col-xs-12 col-sm-9">
                                                                    <a href="javascript:;" class="btn btn-add btn-success"><i class="fa fa-plus"></i></a>
                                                                    <a href="javascript:;" class="btn btn-del btn-danger"><i class="fa fa-trash"></i></a>
                                                                </div>
                                                            </td>
                                                        </tr>
                                                      {/volist}
                                                   {else /}
                                                        <tr class="select_item" data-id="">
                                                            <input type="hidden" name="id" value="">
                                                            <td style="text-align: center; vertical-align: middle;">
                                                                <select class="form-control" name="gid">
                                                                    {volist name="app_version" id="version"}
                                                                    <option value="{$version['id']}">{$version.name}</option>
                                                                    {/volist}
                                                                </select>
                                                            </td>
                                                            <td style="text-align: center; vertical-align: middle;">
                                                                <select class="form-control" name="budget_id">
                                                                    {volist name="budget_manage2" id="bu"}
                                                                    <option value="{$bu.id}">{$bu.name}</option>
                                                                    {/volist}
                                                                </select>
                                                            </td>
                                                            <td style="text-align: center; vertical-align: middle;">

                                                                <div class="bootstrap-table">
                                                                    <div class="fixed-table-container" style="padding-bottom: 0px;">
                                                                        <div class="fixed-table-body">
                                                                            <table class="insert-tr table table-striped table-bordered table-hover onclick" width="100%">
                                                                                <thead>
                                                                                <tr>
                                                                                    <th style="text-align: center; vertical-align: middle; ">
                                                                                        <div class="th-inner ">应用语言</div>
                                                                                    </th>
                                                                                    <th style="text-align: center; vertical-align: middle; ">
                                                                                        <div class="th-inner ">工期（小时）</div>
                                                                                    </th>
                                                                                </tr>

                                                                                <tr class="technology_language">
                                                                                    <td style="text-align: center; vertical-align: middle;">
                                                                                        <select class="form-control" name="tid" >
                                                                                            {volist name="technology_language2" id="th"}
                                                                                            <option value="{$th.id}">{$th.name}</option>
                                                                                            {/volist}
                                                                                        </select>
                                                                                    </td>
                                                                                    <td class="copy" style="text-align: center; vertical-align: middle;">
                                                                                        <div class="col-xs-12 col-sm-8">
                                                                                            <input class="form-control" type="number" name="time">
                                                                                        </div>
                                                                                        <div class="col-xs-12 col-sm-3">
                                                                                            <a href="javascript:;" class="btn my-btn-add btn-success"><i class="fa fa-plus"></i></a>
                                                                                            <a href="javascript:;" class="btn my-btn-del btn-danger"><i class="fa fa-trash"></i></a>
                                                                                        </div>
                                                                                    </td>
                                                                                </tr>
																			   <tr class="technology_language">
                                                                                    <td style="text-align: center; vertical-align: middle;">
                                                                                        <select class="form-control" name="tid" >
                                                                                            <option value="0">仿制</option>
                                                                                        </select>
                                                                                    </td>
                                                                                    <td class="copy" style="text-align: center; vertical-align: middle;">
                                                                                        <div class="col-xs-12 col-sm-8">
                                                                                            <input class="form-control" type="number" name="time">
                                                                                        </div>
                                                                                        <div class="col-xs-12 col-sm-3">
                                                                                            <a href="javascript:;" class="btn my-btn-add btn-success"><i class="fa fa-plus"></i></a>
                                                                                            <a href="javascript:;" class="btn my-btn-del btn-danger"><i class="fa fa-trash"></i></a>
                                                                                        </div>
                                                                                    </td>
                                                                                </tr>
                                                                                </thead>
                                                                            </table>
                                                                        </div>
                                                                    </div>
                                                                </div>

                                                            </td>

                                                            <td class="copy" style="text-align: center; vertical-align: middle;">
                                                                <div class="col-xs-12 col-sm-9">
                                                                    <a href="javascript:;" class="btn btn-add btn-success"><i class="fa fa-plus"></i></a>
                                                                    <a href="javascript:;" class="btn btn-del btn-danger"><i class="fa fa-trash"></i></a>
                                                                </div>
                                                            </td>
                                                        </tr>
                                                  {/notempty}
                                                        </thead>
                                                    </table>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                                <tr id="tech_type3">
                                    <th style="text-align: center; vertical-align: middle; ">
                                        <div class="th-inner ">ui设计技术</div>
                                    </th>
                                    <td>
                                        <div class="bootstrap-table">
                                            <div class="fixed-table-container" style="padding-bottom: 0px;">
                                                <div class="fixed-table-body">
                                                    <table  class="table table-striped table-bordered table-hover onclick" width="100%">
                                                       <thead class="select_box">
                                                        <tr>
                                                            <th style="text-align: center; vertical-align: middle; ">
                                                                <div class="th-inner ">终端版本</div>
                                                            </th>
                                                            <th style="text-align: center; vertical-align: middle; ">
                                                                <div class="th-inner ">功能类型</div>
                                                            </th>
                                                            <th style="text-align: center; vertical-align: middle; ">
                                                                <div class="th-inner ">技术选型</div>
                                                            </th>
                                                        </tr>
                                                  {notempty name="vo['list_3']"}
                                                     {volist name="vo['list_3']" id="item"}
                                                        {php}$item['technology']=json_decode($item['technology'],true);{/php}
                                                         <tr class="select_item" data-id="{$item['id']}">
                                                            <input type="hidden" name="id" value="{$item['id']}">
                                                            <td style="text-align: center; vertical-align: middle;">
                                                                <select class="form-control" name="gid">
                                                                    {volist name="app_version" id="version"}
                                                                    <option value="{$version['id']}" {if condition="(!empty($item)) AND $version['id'] eq $item['gid']"}selected{/if}>{$version.name}</option>
                                                                    {/volist}
                                                                </select>
                                                            </td>
                                                            <td style="text-align: center; vertical-align: middle;">
                                                                <select class="form-control" name="budget_id">
                                                                    {volist name="budget_manage3" id="bu"}
                                                                    <option value="{$bu.id}" {if condition="(!empty($item)) AND $bu['id'] eq $item['budget_id']"}selected{/if}>{$bu.name}</option>
                                                                    {/volist}
                                                                </select>
                                                            </td>
                                                            <td style="text-align: center; vertical-align: middle;">

                                                                <div class="bootstrap-table">
                                                                    <div class="fixed-table-container" style="padding-bottom: 0px;">
                                                                        <div class="fixed-table-body">
                                                                            <table class="insert-tr table table-striped table-bordered table-hover" width="100%">
                                                                                <thead>
                                                                                <tr>
                                                                                    <th style="text-align: center; vertical-align: middle; ">
                                                                                        <div class="th-inner ">应用语言</div>
                                                                                    </th>
                                                                                    <th style="text-align: center; vertical-align: middle; ">
                                                                                        <div class="th-inner ">工期（小时）</div>
                                                                                    </th>
                                                                                </tr>
                                                                                {notempty name="item['technology']"}
                                                                                {volist name="item['technology']" id="ch_item"}
                                                                                <tr class="technology_language">
                                                                                    <td style="text-align: center; vertical-align: middle;">
                                                                                        <select class="form-control" name="tid" >
                                                                                            {volist name="technology_language3" id="th"}
                                                                                            <option value="{$th.id}" {if condition="$th['id'] eq $ch_item[0]"}selected{/if}>{$th.name}</option>
                                                                                            {/volist}
                                                                                        </select>
                                                                                    </td>
                                                                                    <td class="copy" style="text-align: center; vertical-align: middle;">
                                                                                        <div class="col-xs-12 col-sm-8">
                                                                                            <input class="form-control" type="number" name="time" value="{$ch_item[1]}">
                                                                                        </div>
                                                                                        <div class="col-xs-12 col-sm-3">
                                                                                            <a href="javascript:;" class="btn my-btn-add btn-success"><i class="fa fa-plus"></i></a>
                                                                                            <a href="javascript:;" class="btn my-btn-del btn-danger"><i class="fa fa-trash"></i></a>
                                                                                        </div>
                                                                                    </td>
                                                                                </tr>
                                                                                {/volist}
                                                                                {else /}
                                                                                <tr class="technology_language">
                                                                                    <td style="text-align: center; vertical-align: middle;">
                                                                                        <select class="form-control" name="tid" >
                                                                                            {volist name="technology_language3" id="th"}
                                                                                            <option value="{$th.id}">{$th.name}</option>
                                                                                            {/volist}
                                                                                        </select>
                                                                                    </td>
                                                                                    <td class="copy" style="text-align: center; vertical-align: middle;">
                                                                                        <div class="col-xs-12 col-sm-8">
                                                                                            <input class="form-control" type="number" name="time">
                                                                                        </div>
                                                                                        <div class="col-xs-12 col-sm-3">
                                                                                            <a href="javascript:;" class="btn my-btn-add btn-success"><i class="fa fa-plus"></i></a>
                                                                                            <a href="javascript:;" class="btn my-btn-del btn-danger"><i class="fa fa-trash"></i></a>
                                                                                        </div>
                                                                                    </td>
                                                                                </tr>
                                                                                {/notempty}
                                                                                </thead>
                                                                            </table>
                                                                        </div>
                                                                    </div>
                                                                </div>

                                                            </td>

                                                            <td class="copy" style="text-align: center; vertical-align: middle;">
                                                                <div class="col-xs-12 col-sm-9">
                                                                    <a href="javascript:;" class="btn btn-add btn-success"><i class="fa fa-plus"></i></a>
                                                                    <a href="javascript:;" class="btn btn-del btn-danger"><i class="fa fa-trash"></i></a>
                                                                </div>
                                                            </td>
                                                        </tr>
                                                     {/volist}
                                                    {else /}
                                                         <tr class="select_item" data-id="">
                                                            <input type="hidden" name="id" value="">
                                                            <td style="text-align: center; vertical-align: middle;">
                                                                <select class="form-control" name="gid">
                                                                    {volist name="app_version" id="version"}
                                                                    <option value="{$version['id']}">{$version.name}</option>
                                                                    {/volist}
                                                                </select>
                                                            </td>
                                                            <td style="text-align: center; vertical-align: middle;">
                                                                <select class="form-control" name="budget_id">
                                                                    {volist name="budget_manage3" id="bu"}
                                                                    <option value="{$bu.id}">{$bu.name}</option>
                                                                    {/volist}
                                                                </select>
                                                            </td>
                                                            <td style="text-align: center; vertical-align: middle;">

                                                                <div class="bootstrap-table">
                                                                    <div class="fixed-table-container" style="padding-bottom: 0px;">
                                                                        <div class="fixed-table-body">
                                                                            <table class="insert-tr table table-striped table-bordered table-hover onclick" width="100%">
                                                                                <thead>
                                                                                <tr>
                                                                                    <th style="text-align: center; vertical-align: middle; ">
                                                                                        <div class="th-inner ">应用语言</div>
                                                                                    </th>
                                                                                    <th style="text-align: center; vertical-align: middle; ">
                                                                                        <div class="th-inner ">工期（小时）</div>
                                                                                    </th>
                                                                                </tr>

                                                                                <tr class="technology_language">
                                                                                    <td style="text-align: center; vertical-align: middle;">
                                                                                        <select class="form-control" name="tid" >
                                                                                            {volist name="technology_language3" id="th"}
                                                                                            <option value="{$th.id}">{$th.name}</option>
                                                                                            {/volist}
                                                                                        </select>
                                                                                    </td>
                                                                                    <td class="copy" style="text-align: center; vertical-align: middle;">
                                                                                        <div class="col-xs-12 col-sm-8">
                                                                                            <input class="form-control" type="number" name="time">
                                                                                        </div>
                                                                                        <div class="col-xs-12 col-sm-3">
                                                                                            <a href="javascript:;" class="btn my-btn-add btn-success"><i class="fa fa-plus"></i></a>
                                                                                            <a href="javascript:;" class="btn my-btn-del btn-danger"><i class="fa fa-trash"></i></a>
                                                                                        </div>
                                                                                    </td>
                                                                                </tr>
                                                                                </thead>
                                                                            </table>
                                                                        </div>
                                                                    </div>
                                                                </div>

                                                            </td>

                                                            <td class="copy" style="text-align: center; vertical-align: middle;">
                                                                <div class="col-xs-12 col-sm-9">
                                                                    <a href="javascript:;" class="btn btn-add btn-success"><i class="fa fa-plus"></i></a>
                                                                    <a href="javascript:;" class="btn btn-del btn-danger"><i class="fa fa-trash"></i></a>
                                                                </div>
                                                            </td>
                                                        </tr>
                                                  {/notempty}
                                                        </thead>
                                                    </table>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                </thead>
                            </table>
                            <div style="text-align:center;margin-top: 15px;">
                                <span class="btn btn-success submit">保存</span>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
            </div>
        {/volist}
        </div>
    </div>
</div>
<script>
    $(function(){
        $(".submit").click(function(){
            var arrs=new Array();
            var page_id="{$page_id}";
            for(var i=1;i<=3;i++) {
			  var type_box=$(".active.in").find("#tech_type"+i);
			  if(i==1){
			     var gongnens=type_box.find(".gongnen"); 			 
				 for(var j=0;j<gongnens.length; j++){
				       var gongnen= $(gongnens[j]);
				       var cheklist=gongnen.find(".technology_language");
					   var items = new Array();
					   for (var k = 0; k < cheklist.length; k++) {
                         var child_box=$(cheklist[k]);
                         var tid=child_box.find("[name=tid]").val();
                         var time=child_box.find("input[name=time]").val();
                         var item=[tid,time];
                         items.push(item);
                      } 
				
					   var technology=JSON.stringify( items );
                       var type_id=$(".active.in").attr('data-id');
                       var gid=gongnen.find("[name=gid]").val();
                       var tech_type=i;
                       var budget_id=gongnen.find("[name=budget_id]").val();
                       var id=gongnen.find("input[name=id]").val();
                       var arr= {id:id,type_id:type_id,gid: gid, page_id:page_id,tech_type:tech_type,budget_id:budget_id,technology:technology,};
                       arrs.push(arr);
				 }	
			  }else{
                   var select_list=type_box.find(".select_item");
                  console.log(select_list);
                   for(var j=0;j<select_list.length; j++){
                      var select_item= $(select_list[j]);
                      var items = new Array();
                      var cheklist=select_item.find(".technology_language");
                      for (var n = 0; n < cheklist.length; n++) {
                          var child_box=$(cheklist[n]);
                          var tid=child_box.find("[name=tid]").val();
                          var time=child_box.find("input[name=time]").val();
                          var item=[tid,time];
                          items.push(item);
                      }
                      var technology=JSON.stringify( items );
                      var type_id=$(".active.in").attr('data-id');
                      var gid=select_item.find("[name=gid]").val();
                      var tech_type=i;
                      var budget_id=select_item.find("[name=budget_id]").val();
                      var id=select_item.find("input[name=id]").val();

                      var arr= {id:id,type_id:type_id,gid: gid,page_id:page_id,tech_type:tech_type,budget_id:budget_id,technology:technology,};
                      arrs.push(arr);
                  }
			  }
              
            }

            $.ajax({
                type:'POST',
                data:{
                    arrs:JSON.stringify( arrs ),
                },
                url:"{:url('jsave')}",
                traditional: true,
                success:function(data){
                    if(data.code==1){
                        alert(data.msg);
                        window.location.reload();
                    }else{
                        alert(data.msg);
                    }
                }
            });
            return false;
        });

    })
</script>